import request from '@u/request'
// 获取商品列表
const fetchItemLists = (params = {}) => (
  request.get('/itemLists', { params })
)
// 新增商品
const addItem = (params = {}) => {
  return request.post('/addItem', params)
}

// 获取商品详情
const fetchItemDetail = (params = {}) => (
  request.get('/getItemDetail', { params })
)
// 修改商品
const updateItem = (params = {}) => {
  return request.put('/updateItem', params)
}
// 删除商品
const delItem = (params = {}) => (
  request.delete('/delItem', { params })
)
// 批量添加商品 /addMulItems
const addMulItems = (params = {}) => {
  return request.post('/addMulItems', params)
}

export {
  fetchItemLists,
  addItem,
  fetchItemDetail,
  updateItem,
  delItem,
  addMulItems
}
